package weifei.wx.community.entity.dto;


import lombok.Data;
import weifei.wx.community.entity.Avatar;
import weifei.wx.community.entity.User;

import java.util.Date;


@Data
public class UserDTO
{
    private Long id;
    private Avatar avatar;
    private String nickname;

    private Date registerTime;

    private String fullName;
    private String gender;

    private String school;
    private String studentId;
    private Integer grade;
    private String department;
    private String major;
    private String theClass;


    public UserDTO(User user, Avatar avatar)
    {
        this.id = user.getId();
        this.avatar = avatar;
        this.nickname = user.getNickname();

        this.registerTime = user.getRegisterTime();

        this.fullName = user.getFullName();
        this.gender = user.getGender();

        this.school = user.getSchool();
        this.studentId = user.getStudentId();
        this.grade = user.getGrade();
        this.department = user.getDepartment();
        this.major = user.getMajor();
        this.theClass = user.getTheClass();

    }
}

